**********************
PowerShell transcript start
Start time: 20260623114741
Username: STUDENT1\student
RunAs User: STUDENT1\student
Configuration Name: 
Machine: STUDENT1 (Microsoft Windows NT 10.0.26200.0)
Host Application: C:\Program Files\PowerShell\7\pwsh.dll -noexit -command try { . "c:\Users\student\AppData\Local\Programs\Microsoft VS Code\fcf604774b\resources\app\out\vs\workbench\contrib\terminal\common\scripts\shellIntegration.ps1" } catch {}
Process ID: 14732
PSVersion: 7.6.3
PSEdition: Core
GitCommitId: 7.6.3
OS: Microsoft Windows 10.0.26200
Platform: Win32NT
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1, 6.0, 7.0
PSRemotingProtocolVersion: 2.4
SerializationVersion: 1.1.0.1
WSManStackVersion: 3.0
**********************
]633;D;0]633;A]633;P;Cwd=C:\x5cUsers\x5cstudent\x5cDesktop\x5cLabToolPS C:\Users\student\Desktop\LabTool> ]633;B
PS>try { & '$PayloadScript' $argString; $exitCode = $LASTEXITCODE } catch { Write-Error "Payload wrapper caught error: $($_.Exception.Message)"; $exitCode = 1 } Stop-Transcript | Out-Null; Write-Host "Payload wrapper exiting with code $exitCode"; exit $exitCode"@; $wrapperContent | Set-Content -Path $wrapperScript -Encoding UTF8; pwsh -NoProfile -ExecutionPolicy Bypass -File $wrapperScript; Write-Host 'DONE'"
At line:1 char:259
+ … it $exitCode"@; $wrapperContent | Set-Content -Path $wrapperScript -E …
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token '"@; $wrapperContent | Set-Content -Path $wrapperScript -Encoding UTF8; pwsh -NoProfile -ExecutionPolicy Bypass -File $wrapperScript; Write-Host 'DONE'"' in expression or statement.
ParserError: 
Line |
   1 |  … it $exitCode"@; $wrapperContent | Set-Content -Path $wrapperScript -E …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Unexpected token '"@; $wrapperContent | Set-Content -Path $wrapperScript
     | -Encoding UTF8; pwsh -NoProfile -ExecutionPolicy Bypass -File
     | $wrapperScript; Write-Host 'DONE'"' in expression or statement.

]633;D;0]633;A]633;P;Cwd=C:\x5cUsers\x5cstudent\x5cDesktop\x5cLabToolPS C:\Users\student\Desktop\LabTool> ]633;B
PS>pwsh -NoProfile -Command "Set-StrictMode -Version Latest; . 'c:\Users\student\Desktop\LabTool\Bootstrap.ps1'; Write-Host 'Bootstrap parsed OK'"

]633;D;0]633;A]633;P;Cwd=C:\x5cUsers\x5cstudent\x5cDesktop\x5cLabToolPS C:\Users\student\Desktop\LabTool> ]633;B
PS>if (Test-Path 'C:\ProgramData\LabBootstrap\bootstrap.log') { Get-Content 'C:\ProgramData\LabBootstrap\bootstrap.log' -Tail 80 } else { Write-Host 'No bootstrap log found' }
2026-06-23T11:49:36 :: ==== Bootstrap started ====
2026-06-23T11:49:36 :: Running as admin: True
2026-06-23T11:49:36 :: Passed named parameters: Count=10; Region=US
2026-06-23T11:49:36 :: Passed positional args: <none>
2026-06-23T11:49:36 :: Passed unbound invocation args: <none>
2026-06-23T11:49:36 :: Raw command line: "C:\Users\student\Desktop\LabTool\LabTool.exe" -count 10 -region US
2026-06-23T11:49:36 :: Raw command line args: C:\Users\student\Desktop\LabTool\LabTool.exe -count 10 -region US
2026-06-23T11:49:36 :: Using pwsh: C:\Program Files\PowerShell\7\pwsh.exe
2026-06-23T11:49:36 :: Starting module install script via pwsh: C:\Users\student\AppData\Local\Temp\install-modules.ps1
STEP: Checking for module Microsoft.Graph.Authentication
STEP: Verifying installed module Microsoft.Graph.Authentication
Found module: Microsoft.Graph.Authentication 2.38.0 at C:\Users\student\Documents\PowerShell\Modules\Microsoft.Graph.Authentication\2.38.0\Microsoft.Graph.Authentication.psd1
Found module: Microsoft.Graph.Authentication 2.38.0 at C:\Users\student\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Authentication\2.38.0\Microsoft.Graph.Authentication.psd1
STEP: Checking for module Microsoft.Graph.Users
STEP: Verifying installed module Microsoft.Graph.Users
Found module: Microsoft.Graph.Users 2.38.0 at C:\Users\student\Documents\PowerShell\Modules\Microsoft.Graph.Users\2.38.0\Microsoft.Graph.Users.psd1
Found module: Microsoft.Graph.Users 2.38.0 at C:\Users\student\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Users\2.38.0\Microsoft.Graph.Users.psd1
STEP: Checking for module Microsoft.Graph.Identity.DirectoryManagement
STEP: Verifying installed module Microsoft.Graph.Identity.DirectoryManagement
Found module: Microsoft.Graph.Identity.DirectoryManagement 2.38.0 at C:\Users\student\Documents\PowerShell\Modules\Microsoft.Graph.Identity.DirectoryManagement\2.38.0\Microsoft.Graph.Identity.DirectoryManagement.psd1
Found module: Microsoft.Graph.Identity.DirectoryManagement 2.38.0 at C:\Users\student\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Identity.DirectoryManagement\2.38.0\Microsoft.Graph.Identity.DirectoryManagement.psd1
STEP: Checking for module Microsoft.Graph.Users.Actions
STEP: Verifying installed module Microsoft.Graph.Users.Actions
Found module: Microsoft.Graph.Users.Actions 2.38.0 at C:\Users\student\Documents\PowerShell\Modules\Microsoft.Graph.Users.Actions\2.38.0\Microsoft.Graph.Users.Actions.psd1
Found module: Microsoft.Graph.Users.Actions 2.38.0 at C:\Users\student\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Users.Actions\2.38.0\Microsoft.Graph.Users.Actions.psd1
STEP: Checking for module Microsoft.Graph.Identity.SignIns
STEP: Verifying installed module Microsoft.Graph.Identity.SignIns
Found module: Microsoft.Graph.Identity.SignIns 2.38.0 at C:\Users\student\Documents\PowerShell\Modules\Microsoft.Graph.Identity.SignIns\2.38.0\Microsoft.Graph.Identity.SignIns.psd1
Found module: Microsoft.Graph.Identity.SignIns 2.38.0 at C:\Users\student\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Identity.SignIns\2.38.0\Microsoft.Graph.Identity.SignIns.psd1
2026-06-23T11:49:44 :: Module install script finished
2026-06-23T11:49:44 :: Running payload: C:\Users\student\Desktop\LabTool\Payload.ps1 with -Count 10 -Region US
2026-06-23T11:49:44 :: Payload script exists: True
2026-06-23T11:49:44 :: PowerShell path: C:\Program Files\PowerShell\7\pwsh.exe
2026-06-23T11:49:44 :: PowerShell exists: True
]633;D;0]633;A]633;P;Cwd=C:\x5cUsers\x5cstudent\x5cDesktop\x5cLabToolPS C:\Users\student\Desktop\LabTool> ]633;B
PS>Get-ChildItem "$env:TEMP" -Filter 'payload-*.log' -File | Select-Object FullName,LastWriteTime | Sort-Object LastWriteTime -Descending | Select-Object -First 10 | Format-Table -AutoSize
]633;D;0]633;A]633;P;Cwd=C:\x5cUsers\x5cstudent\x5cDesktop\x5cLabToolPS C:\Users\student\Desktop\LabTool> ]633;B
PS>pwsh -NoProfile -Command "Get-ChildItem -Path $env:TEMP -Filter 'payload-*.log' -File | Sort-Object LastWriteTime -Descending | Select-Object -First 10 | Format-Table FullName,LastWriteTime -AutoSize"

]633;D;0]633;A]633;P;Cwd=C:\x5cUsers\x5cstudent\x5cDesktop\x5cLabToolPS C:\Users\student\Desktop\LabTool> ]633;B
PS>pwsh -NoProfile -Command "Get-ChildItem -Path $env:TEMP -Filter 'payload-wrapper*' -File -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object FullName,LastWriteTime | Format-Table -AutoSize; Write-Host '---'; Get-ChildItem -Path $env:TEMP -Filter 'payload-*.log' -File -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object FullName,LastWriteTime | Format-Table -AutoSize; Write-Host '---'; if (Test-Path 'C:\ProgramData\LabBootstrap\bootstrap.log') { Select-String -Path 'C:\ProgramData\LabBootstrap\bootstrap.log' -Pattern 'Payload wrapper script|Payload command|Payload process|ERROR starting payload|Payload wrapper' }"

]633;D;0]633;A]633;P;Cwd=C:\x5cUsers\x5cstudent\x5cDesktop\x5cLabToolPS C:\Users\student\Desktop\LabTool> ]633;B
PS>Get-ChildItem 'c:\Users\student\Desktop\LabTool' -Name | Sort-Object
$payloadLog
Bootstrap.ps1
LabTool.exe
LabTool.exe -count 10 -region US.lnk
Payload - Copy.ps1
Payload.ps1
Payload.ps1.testing
PowerShell-7.6.3-win-x64.msi.no
Tenant_Students_Export_20260623_114840.csv
]633;D;0]633;A]633;P;Cwd=C:\x5cUsers\x5cstudent\x5cDesktop\x5cLabToolPS C:\Users\student\Desktop\LabTool> ]633;B
PS>pwsh -NoProfile -Command "$payloadArgs=@('-Count','10','-Region','US'); $payloadArgsLiteral = if ($payloadArgs.Count -gt 0) { "@($($payloadArgs | ForEach-Object { "'" + ($_ -replace "'", "''") + "'" }; -join ', '))" } else { '@()' }; Write-Host 'LITERAL:'; Write-Host $payloadArgsLiteral; $payloadLog='C:\Temp\payload-test.log'; $PayloadScript='C:\Users\student\Desktop\LabTool\Payload.ps1'; $wrapperContent = @"Set-StrictMode -Version Latest

]633;D;1]633;A]633;P;Cwd=C:\x5cUsers\x5cstudent\x5cDesktop\x5cLabToolPS C:\Users\student\Desktop\LabTool> ]633;B
PS>Start-Transcript -Path '$payloadLog' -Force | Out-Null
**********************
PowerShell transcript end
End time: 20260623115431
**********************
